<template>
    <view class="com-chat-pdf">
        <view class="pdf-item cursor" @click="openPdf(msgItem.msn)">
            <text class="hkfont hk-pdf"></text>
            <text>点击查看</text>
            <text class="iconfont icon-jiantou"></text>
        </view>
    </view>
</template>

<script>
	/**
	 * 聊天查看单张pdf
	 */
    export default {
        name:'com-chat-pdf',
        props: {
        	msgItem: {
        		type: Object,
        		default: function() {
        			return {}
        		}
        	}
        },
        data(){
            return {

            }
        },
        methods:{
            openPdf(pdfUrl){
				let url = encodeURIComponent(JSON.stringify(pdfUrl));
				uni.navigateTo({
					url: "/pages/order_details/laladetail?move_url=" + url,
				})
                // window.open(pdfUrl);
            },
        }
    }
</script>

<style lang="scss">
    .com-chat-pdf{
        width: 100%;
    }
    .pdf-item {
        color:#1890FF;
		display: flex;
		align-items: center;
        .hkfont {
			font-size: 20px;
			margin-right: 6px;
            color: #D27D55;
        }
    }
</style>
